#!/usr/bin/env python
# Create: 2019/3/9
__author__ = '749B'

COURSE = "深度学习的发展与应用"
PRICE = 18  # RMB
TEACHER = "David"

p0 = {'url_info': [("宣传片", "https://media.wanmen.org/a10b42f6-3feb-4b84-a670-df6caa94eac4_pc_mid")]}

p1 = {'name': "第1讲 深度学习的发展与应用", 'url_info': [
    ("1.1 神经网络简介", "https://media.wanmen.org/f3ee88f7-175f-44bf-90e2-f565e62122fc_pc_mid"),
    ("1.2 深度学习的发展（一）", "https://media.wanmen.org/e0e0ae37-3afd-452d-af12-8b611ffa541f_pc_mid"),
    ("1.3 深度学习的发展（二）", "https://media.wanmen.org/29ccec18-d345-4b03-bcd6-8b06169e3a20_pc_mid"),
    ("1.4 深度学习的应用（一）", "https://media.wanmen.org/3d975f92-c317-4ca0-b278-3abed51b14a8_pc_mid"),
    ("1.5 深度学习的应用（二）", "https://media.wanmen.org/94812e45-656a-495f-b769-fae154b3d950_pc_mid"),
]}

parts = [p0, p1]
URLS = [(part.get('name'), item[0], item[1]) for part in parts for item in part.get('url_info')]

if __name__ == '__main__':
    from utils import check_url
    starts = 'https://media.wanmen.org/'
    ends = '_pc_mid'
    check_url.check([i[2] for i in URLS], starts, ends)
    print("视频数量:", len(URLS))